colormap(gray);
resol=4e-3/(191-128)
for t=0:2:250
    I(:,:,t+1)=double(imread(strcat(...
        'H:\Doutorado\Dados\lacit\20-09-12\tarde\Acq_A10_001\Acq_A10_001\ImgACQ10_',num2str(t,'%06g'),'.jpg')));
    I2(:,:,t+1)=double(~(I(205:225,:,t+1)>80));
    imagesc(I(:,:,t+1)),colorbar;
    pause(0.1);
    if (t>0)
%         X=xcorr2(I2(:,:,t),I2(:,:,t+1));
%         [v,i]=max(max(X));
%         desl(t)=i;
        M=[M I(:,end-8*2:end,t+1)];
    else
        M=I(:,:,t+1);
    end
end
%%
figure(4);
imagesc(M(:,1:end/2));colormap(gray);

%%

%  X=xcorr2(I2(:,:,1),I2(:,:,9));
%  [v,i]=max(max(X))